package main

import "fmt"

func main() {
	//TODO 测试TODO
	var mp = make(map[string]string)
	var mp2 = make(map[string]string)
	fmt.Println(mp2)
	mp["url"] = "www.baidu.com"
	fmt.Println(mp["url"])
	userInfo := map[string]string{
		"username": "zhangsan",
		"password": "123456",
	}
	fmt.Println(userInfo["username"])
	v, ok := userInfo["username"]
	if ok {
		fmt.Println(v)
		fmt.Printf("ok: %v", ok)
	} else {
		fmt.Println("map中没有此")
		fmt.Printf("ok: %v \n", ok)
	}
	delete(mp, "url")
	v1, ok1 := userInfo["url"]
	if ok1 {
		fmt.Println(v1)
		fmt.Printf("ok: %v \n", ok1)
	} else {
		fmt.Println("map中没有此")
		fmt.Printf("ok: %v", ok1)
	}

	var acoreMap = map[string]int{
		"张三": 11,
		"李四": 22,
		"王五": 33,
	}

	for _, value := range acoreMap {
		fmt.Println(value)
	}
	var cityMap = map[interface{}]interface{}{
		"老公": "王老五",
		1:    123,
	}
	for _, value := range cityMap {
		fmt.Println(value)
	}
}
